//
//  TouchAction.h
//  Monster_Martial_Arts_Version_0
//
//  Created by chiawei.tseng on 13/1/10.
//
//

#ifndef Monster_Martial_Arts_Version_0_CTouchAction_h
#define Monster_Martial_Arts_Version_0_CTouchAction_h

#include "CInputAction.h"
#include "point.h"
#include "CBattleManager.h"

using namespace MMA;
class CBattleObject;

struct TOUCH_DATA  : public INPUT_DATA 
{
    enum TOUCH_TYPE
    {
        INVALID_TOUCH_TYPE =-1,
        TOUCH_TYPE_BEGAN,
        TOUCH_TYPE_MOVE,
        TOUCH_TYPE_END,
    };
    
    fPoint      m_fTouchPoint;
    
    TOUCH_TYPE  m_TouchType;
    
    CBattleObject*    Team1Member;
    CBattleObject*    Team2Member;
    CBattleObject*    targetMember;
};

class CTouchAction : public CInputAction
{
public:
    
    CTouchAction();
    
    ~CTouchAction();
    
    //void    Init(INPUT_ID,fPoint,TOUCH_DATA::TOUCH_TYPE);
    
    void    UpdateTouchData(fPoint,TOUCH_DATA::TOUCH_TYPE);
    
    virtual void    HandlResult(void* data);
    
private:
    
    CBattleObject*      GetTouchTeamMember(BATTLE_TEAM_NUMBER,const fPoint&);
    
};


#endif
